<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title>Деберц</title>

  <meta content="text/html; charset=UTF-8" http-equiv="content-type">
  <script type="text/javascript" src="jquery/cometd.js"></script>
  <script type="text/javascript" src="jquery/jquery-1.4.2.js"></script>
  <script type="text/javascript" src="jquery/jquery.json-2.2.js"></script>
  <!--<script type="text/javascript" src="jquery/jquery.cometd.js"></script>-->

  <!--some test-->
  <script type="text/javascript">
    function whichCard(e) {
      var targ;
      if (!e) {
        var e = window.event;
      }
      if (e.target) {
        targ = e.target;
      }
      else if (e.srcElement) {
        targ = e.srcElement;
      }
      if (targ.nodeType == 3) // defeat Safari bug
      {
        targ = targ.parentNode;
      }
      var par = targ.parentNode;
      var karta = par.getAttribute('class').substring(3);
      //alert(karta);
      deberc.gameRoom.move('m;' + karta);
    }
  </script>
  <!-- some test-->

  <link href="main.css" type="text/css" rel="stylesheet"/>
  <link href="cards.css" type="text/css" rel="stylesheet"/>

</head>
<body class="deberc">
<div id="mr">
  <div class="tabs">
    <div class="active">
      <div class="h f">&nbsp;</div>
      <div class="h">&nbsp;</div>
      <div class="t">Все игры</div>
    </div>
  </div>

  <div class="line">
    <div class="btn blue" id="mr_create">
      <div class="t"></div>
      <div class="m">Создать игру</div>
      <div class="b"></div>
    </div>
  </div>

  <div class="table" id="mr_t">
    <div class="r h">
      <div class="c wn">№</div>
      <div class="c wp">Игроки</div>
      <div class="c wd">Описание</div>
      <div class="c wa">Действия</div>
      <div class="b"></div>
    </div>
    <div class="t" id="mr_t_r">
    </div>
  </div>
</div>

<div id="gs">
  <div id="gs_0" class="r"></div>
  <div id="gs_1" class="r"></div>
  <div id="gs_s" class="btn blue">
    <div class="t"></div>
    <div class="m">Начать игру</div>
    <div class="b"></div>
  </div>
  <div id="gs_l" class="btn gray">
    <div class="t"></div>
    <div class="m">Выйти</div>
    <div class="b"></div>
  </div>
</div>

<div id="gr">
  <h1 style="position: absolute; left: 20px; top: 5px;">Текущая сдача</h1>

  <div id="current_deal"
       style="position: absolute; width: 100px; height: 40px; left: 20px; top: 20px; border: 1px solid black;">
    <table border="1">
      <tr>
        <td>номер</td>
        <td>Игрок1</td>
        <td>Игрок2</td>
      </tr>
      <tr id="tbl_cntnt">
        <td id='td2'>1</td>
        <td id='td0'>0</td>
        <td id='td1'>0</td>
      </tr>
    </table>
  </div>
  <h1 style="position: absolute; left: 20px; top: 80px;">Все сдачи</h1>

  <div id="all_game_points"
       style="position: absolute; width: 100px; height: 300px; left: 20px; top: 100px; border: 1px solid black;">
    <table id='tbl' border="1">
      <tr>
        <td>номер</td>
        <td>Игрок1</td>
        <td>Игрок2</td>
      </tr>
    </table>
  </div>
  <div id="monitor"
       style="position: absolute; width: 200px; height: 100px; overflow: scroll; left: 300px; top: 200px; border: 1px solid black;"></div>
  <div id="gr_0" class="p t">
    <div id="gr_0_i" class="i"></div>
    <div id="gr_0_n" class="d"></div>
    <div id="gr_0_s" class="d"></div>
    <div id="gr_0_c" class="d"></div>
    <div id="gr_0_d" class="d bgray"></div>
    <div id="gr_0_h" class="h" onclick="whichCard(event);"></div>
  </div>
  <div id="gr_1" class="p b">
    <div id="gr_1_i" class="i"></div>
    <div id="gr_1_n" class="d"></div>
    <div id="gr_1_s" class="d"></div>
    <div id="gr_1_c" class="d"></div>
    <div id="gr_1_d" class="d bgray"></div>
    <div id="gr_1_h" class="h" onclick="whichCard(event);"></div>
  </div>
  <div id="gr_l" class="btn gray">
    <div class="t"></div>
    <div class="m">Выйти</div>
    <div class="b"></div>
  </div>
  <div id="gr_u">
    <div class="d bgray">Колода:</div>
    <div class="c"></div>
  </div>
  <div id="gr_g">
    <div class="d bgray">Играет:</div>
    <div class="c"></div>
  </div>
  <div id="gr_h">
    <div class="d bgray">Козырь:</div>
    <div id="gr_h_k"></div>
  </div>
  <div id="gr_o">
    <div class="d bgray">Обяз на:</div>
    <div class="c"></div>
  </div>
  <div id="gr_k" class="status">
    <div class="d bgray">Оставить козырь?</div>
    <div id="gr_k_m" class="m"></div>
    <div id="gr_k_k" class="btn blue">
      <div class="t"></div>
      <div class="m">Играю</div>
      <div class="b"></div>
    </div>
    <div id="gr_k_p" class="btn blue">
      <div class="t"></div>
      <div class="m">Пас</div>
      <div class="b"></div>
    </div>
  </div>
  <div id="gr_t" class="status">
    <div class="d bgray">Выберите козырь:</div>
    <div id="gr_t_S" class="btn blue">
      <div class="t"></div>
      <div class="m CS"></div>
      <div class="b"></div>
    </div>
    <div id="gr_t_C" class="btn blue">
      <div class="t"></div>
      <div class="m CC"></div>
      <div class="b"></div>
    </div>
    <div id="gr_t_D" class="btn blue">
      <div class="t"></div>
      <div class="m CD"></div>
      <div class="b"></div>
    </div>
    <div id="gr_t_H" class="btn blue">
      <div class="t"></div>
      <div class="m CH"></div>
      <div class="b"></div>
    </div>
    <div id="gr_t_p" class="btn blue">
      <div class="t"></div>
      <div class="m">Пас</div>
      <div class="b"></div>
    </div>
  </div>
  <div id="gr_w" class="status"></div>
</div>

<script type="text/javascript" src="/_ah/channel/jsapi" charset="utf-8"></script>
<script type="text/javascript" src="js/main.js" charset="utf-8"></script>
<script type="text/javascript" src="js/main_room.js" charset="utf-8"></script>
<script type="text/javascript" src="js/game_room_view_player.js" charset="utf-8"></script>
<script type="text/javascript" src="js/game_room_view.js" charset="utf-8"></script>
<script type="text/javascript" src="js/game_room.js" charset="utf-8"></script>
<script type="text/javascript" src="js/game_starter.js" charset="utf-8"></script>
<script type="text/javascript" src="js/vk_api.js" charset="utf-8"></script>

</body>
</html>